package org.wenhuayuan.project.main.demo.demoDataItem

import android.view.View
import android.widget.ImageView
import androidx.recyclerview.widget.RecyclerView
import org.wenhuayuan.project.main.R
import org.wenhuayuan.uilibrary.hiitem.HiDataItem

class ActivityDataItem(data: ItemData??) : HiDataItem<ItemData, RecyclerView.ViewHolder>(data!!) {
    override fun onBindData(holder: RecyclerView.ViewHolder, position: Int) {
        val imageView = holder!!.itemView.findViewById<ImageView>(R.id.item_image)
        imageView.setImageResource(R.drawable.item_activity)
    }

//    override fun onBindData(holder: ActivityHolder, position: Int) {
//        val imageView = holder!!.itemView.findViewById<ImageView>(R.id.item_image)
//        imageView.setImageResource(R.drawable.item_activity)
//    }


    override fun getItemLayoutRes(): Int {
        return R.layout.layout_list_item_activity
    }

    class ActivityHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {

    }
}